#pragma once
#ifndef _Include_GamePlay_h_
#define _Include_GamePlay_h_

class Player;
class ChessBoard;
class ChessBoardView;
class ChessPieceView;

class GamePlay
{
public:
    explicit GamePlay();
    ~GamePlay();

public:
    HRESULT IsStart(BOOL& is_start);
    HRESULT IsSelectChessPiece(BOOL& is_select);
    HRESULT SetNoSelectChessPiece();
    HRESULT StartGame(const HWND& hwnd);
    HRESULT ControlsSelectPieces(const int x_pos, const int y_pos, const HWND& hwnd);
    HRESULT ControlsMovePieces(const HWND& hwnd, const int x_pos, const int y_pos);
    HRESULT ControlsDrawing(const HWND& hwnd);

protected:
    HRESULT ChangeTurn();
    HRESULT KillChessPiece(const HWND& hwnd, const CHESS_POS& mouse_pos, const PLAYER& fill);
    HRESULT GameOver(const HWND& hwnd);

private:
    BOOL m_is_start;
    BOOL m_is_select;
    CHESS_POS m_select_pos;
    std::shared_ptr<Player> m_player1;
    std::shared_ptr<Player> m_player2;
    std::shared_ptr<ChessBoard> m_chess_board;
    std::unique_ptr<ChessBoardView> m_chess_board_view;
    std::unique_ptr<ChessPieceView> m_chess_piece_view;
};

#endif//_Include_GamePlay_h_